programming4us
           
 
 
Windows

Windows 7 : Adding Folders and Files to the Default Website (part 1) - Setting Permissions on the Default Website Folder

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
3/22/2011 9:19:23 AM
To set up your own web content in Windows 7 is to add that content to the existing default website. This requires no reconfiguration of the server, of IIS, of the Windows 7 Firewall, of the client computers, or of the router. You simply add the content, and it’s ready for browsing.

Setting Permissions on the Default Website Folder

Somewhat annoyingly, Windows 7 makes it difficult for you to modify the contents of the wwwroot folder. For example, if you copy a file to the folder, you need to enter your User Account Control (UAC) credentials to allow the copy. Even worse, you get read-only access to the files, so if you edit a file you can’t save your changes.

To avoid these hassles, you need to adjust the Security permissions on the wwwroot folder to give your Windows 7 user account Full Control. Here are the steps to follow:

1.
Select Start, Computer, and navigate to the inetpub folder on your system drive.

2.
Right-click the wwwroot folder, and then click Properties to open the folder’s Properties dialog box.

3.
Select the Security tab.

4.
Click Edit. Windows 7 displays the Permissions for wwwroot dialog box.

5.
Click Add to display the Select Users or Groups dialog box.

6.
In the Enter the Object Names to Select text box, type your username, and then click OK to return to the Permissions dialog box.

7.
Select your username in the Group or User Names list.

8.
In the Permissions list, under the Allow column, click to activate the Full Control check box, as shown in Figure 1.



Figure 1. For hassle-free editing in the wwwroot folder, give your user account Full Control permission.


9.
Click OK to return to the Security tab.

10.
Click OK to put the new security settings into effect.

Adding a File to the Default Website

If you have just a few web content files that you want to add to the Windows 7 website, you can add them directly to the default website folder. First, create your web content file (HTML, ASP, or whatever). Here’s a sample HTML file—which I’ve named HelloWorld.htm—that I’ll use as an example:

<html>
<head>
<title>Hello World!</title>
</head>

<body>

<div style="font-size: 36pt;
font-family: Verdana;
color: DarkBlue">
Hello Windows 7 World!!
</div>

</body>
</html>

Note

For a primer on Hypertext Markup Language (HTML) and Cascading Style Sheets (CSS), check out my book The Complete Idiot’s Guide to Creating a Website. You can find out more about it at my own site at www.mcfedries.com/.


Caution

Don’t use spaces in the names of files (or folders) that you add to your website. Although Internet Explorer may display such pages successfully, other browsers may not.


Next, save the file to the wwwroot folder.

Caution

If your web content file references other files—for example, an HTML file that uses the <img> tag to reference an image file—be sure to copy those files to the wwwroot folder. You can either put the files in the root, or you can store them in a subfolder. For example, you might want to create a subfolder named images and use it to store your image files. If you store the files in subfolders, make sure you adjust the path in your code, as required. For example, if you place a file named HelloWorld.jpg in the images subfolder, you need to add the subfolder to the <img> tag, like so:

<img src="images\HelloWorld.jpg" />


Tip

A quick way to navigate to the wwwroot folder from IIS Manager is to open the Computer, Sites branch (where Computer is the name of the computer running IIS), select Default Web Site, and then click Explore in the Actions pane. (You can also right-click Default Web Site, and then click Explore in the shortcut menu.)


Figure 2 shows the HelloWorld.htm file copied to the wwwroot folder, and Figure 3 shows the file displayed with Internet Explorer.

Figure 2. You can add individual files directly to the wwwroot folder.

Figure 3. The HelloWorld.htm file displayed with Internet Explorer.
Other -----------------
- Turning Windows 7 into a Web Server : Understanding the Default Website
- Turning Windows 7 into a Web Server : Accessing Your Website
- Windows 7 : Installing Internet Information Services
- Windows 7 : Using Virtual Private Network Connections
- Windows 7 : Using Dynamic DNS to Access Your Network & Configuring a Network Computer for Remote Administration
- Windows 7 : Connecting to a Remote Desktop via the Internet
- Windows 7 : Connecting to the Remote Desktop (part 2) - Making an Advanced Connection
- Windows 7 : Connecting to the Remote Desktop (part 1) - Making a Basic Connection
- Windows 7 : Setting Up the Remote Computer as a Host (part 2) - Configuring XP to Act as a Remote Desktop Host
- Windows 7 : Setting Up the Remote Computer as a Host (part 1) - Configuring Windows 7 or Vista to Act as a Remote Desktop Host
- Windows 7 : Working with Network Files Offline (part 6) - Dealing with Synchronization Conflicts
- Windows 7 : Working with Network Files Offline (part 5) - Synchronizing Your Offline Files
- Windows 7 : Working with Network Files Offline (part 4) - Working with Network Files While You’re Offline
- SOA with .NET and Windows Azure : WCF Discovery (part 3) - Discovery Proxies for Managed Discovery & Implicit Service Discovery
- SOA with .NET and Windows Azure : WCF Discovery (part 2) - Locating a Service Ad Hoc & Sending and Receiving Service Announcements
- SOA with .NET and Windows Azure : WCF Discovery (part 1) - Discovery Modes
- Windows 7 : Working with Network Files Offline (part 3) - Prohibiting a Network Folder from Being Made Available Offline & Encrypting Offline Files
- Windows 7 : Working with Network Files Offline (part 2) - Changing the Amount of Disk Space Used by Offline Files
- Windows 7 : Working with Network Files Offline (part 1) - Activating the Offline Files Feature & Making a File or Folder Available for Offline Use
- Windows 7 : Sharing Resources with the Network (part 2) - Monitoring Your Shared Resources
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us